//
//  NetworkingTools.h
//  OC-微博
//
//  Created by Apple on 15/11/10.
//  Copyright © 2015年 Apple. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
/// 网络请求枚举
typedef enum : NSUInteger {
    GET,
    POST,
} HMRequestMethod;
//回调
typedef void(^HMRequestCallBack)(id result,NSError *error);
@interface NetworkingTools : AFHTTPSessionManager
@property (nonatomic, copy) NSString *appKey;
@property (nonatomic, copy) NSString *appSecret;
@property (nonatomic, copy) NSString *redirectUrl;
//OAuth 授权
@property (nonatomic, copy) NSURL *oauth;
+ (instancetype)shardTools;
- (void)request:(HMRequestMethod)method URLString:(NSString *)urlstring parameters:(id)params finished:(HMRequestCallBack)finish;
//加载accessToken
- (void)loadAccessToken:(NSString *)code finished:(HMRequestCallBack)finished;
//加载用户信息
- (void)loadUserInfo:(NSString *)uid finished:(HMRequestCallBack)finished;
//加载微博信息
- (void)loadStatuesInfofinished:(HMRequestCallBack)finished;
@end
